<script type="text/javascript">
$(document).ready(function() {
	
	 $(".addboxtreetop").click(function(event){
		 var feedID = $(this).attr('id').split('-')[1];
		 var feedURL = $('#feedid-'+feedID).attr('href');
         event.preventDefault();
         var options = {feedURL:feedURL};
         loadViewAddUserFeed("/feed/activeadduserfeedtopsuggest", options, function(data){
            $('#newsList').html(data);
            $('.scroll').css('height','auto'); 
            $("#headergreybox").text("<?= $this->translate('addMyFeed')?>");
            prepareInputsForHints();
         });
         
	 });
});
</script>

<?if (sizeof($this->feeds) > 0): ?>
<ul class="jqueryFileTree" style="display: none;">
    <?foreach ($this->feeds as $feed): ?>
    <li class="file ext_txt">
        <img id="addFeed-<?=$feed->oid?>" class="addboxtreetop" alt="Add Feed" src="../img/boxbar/addmyfeeds.png" />
        <img class="icoFeed" alt="Feed img" src="../img/feedtree/images/feedrssico.png" />
        <a id="feedid-<?=$feed->oid?>"
           href="<?=$feed->url?>"
           class="tip" 
           rel="<?=$feed->oid?>"
           title="<?=$feed->description?>">
           <?=$feed->name?>
        </a>
    </li>
    <?endforeach;?>
</ul>
<?endif;?>